/**
 * 
 */
package com.cp16.tss.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * @author GiangHN
 * @version 1.0
 * @since 01/01/2014
 * 
 */

@Entity
@Table(name = "CUSTOMER")
public class Customer implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@Column(name = "CUSTOMER_ID", length = 4, nullable = false)
	private int customerId;
	@Column(name = "CUSTOMER_NAME", nullable = false)
	private String customerName;
	@Column(name = "PRIORITY")
	private int priority;
	@Embedded
	private Address address;
	@Column(name = "PHONE")
	private int phoneNumber;
	@OneToMany(cascade = CascadeType.ALL)
	private Collection<Requirement> requirementList = new ArrayList<Requirement>();

	/**
	 * @return the customerId
	 */
	public int getCustomerId() {
		return customerId;
	}

	/**
	 * @param customerId
	 *            the customerId to set
	 */
	public void setCustomerId(int customerId) {
		this.customerId = customerId;
	}

	/**
	 * @return the customerName
	 */
	public String getCustomerName() {
		return customerName;
	}

	/**
	 * @param customerName
	 *            the customerName to set
	 */
	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	/**
	 * @return the priority
	 */
	public int getPriority() {
		return priority;
	}

	/**
	 * @param priority
	 *            the priority to set
	 */
	public void setPriority(int priority) {
		this.priority = priority;
	}

	/**
	 * @return the address
	 */
	public Address getAddress() {
		return address;
	}

	/**
	 * @param address
	 *            the address to set
	 */
	public void setAddress(Address address) {
		this.address = address;
	}

	/**
	 * @return the phoneNumber
	 */
	public int getPhoneNumber() {
		return phoneNumber;
	}

	/**
	 * @param phoneNumber
	 *            the phoneNumber to set
	 */
	public void setPhoneNumber(int phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	/**
	 * @return the requirementList
	 */
	public Collection<Requirement> getRequirementList() {
		return requirementList;
	}

	/**
	 * @param requirementList
	 *            the requirementList to set
	 */
	public void setRequirementList(Collection<Requirement> requirementList) {
		this.requirementList = requirementList;
	}

}
